@import "colors";

.docs {
  max-width: 1700px;
}

.docs-sidebar {
  margin-right: calc(var(--bs-gutter-x) / 2);
  border-bottom: 0;
  overflow: hidden;
  .docs-toc-item.active {
    margin: 0 0 0.5rem 0 !important;
    &> a {
      color: rgba(0, 0, 0, 0.65);
      background-color: #f9f7fb;
    }
    & > .docs-sidenav li {
      a {
        color: rgba(0, 0, 0, 0.65);
      }
      &.active a {
        color: #fff;
      }
    }
  }
}

.docs .article h1 {
  font-size: 1.4rem;
}

.docs .article h2 {
  font-size: 1.1rem;
}

.docs .article h3 {
  font-size: 1rem;
  font-weight: normal;
}

.docs-article-container {
  min-height: calc(100vh - 428px);
  max-width: none;
  table {
    display: table;
    width: auto;
    overflow: auto;
    margin-left: auto;
    margin-right: auto;
  }
}

.docs-content {
  padding-bottom: 0 !important;
}


.docs .article {
  font-size: 0.8rem;

  h1 {
    font-size: 1.45rem;
  }

  h2 {
    font-size: 1.3rem;
  }
}

.docs-version {
  margin: 0 -15px 0;
  padding: 7px 15px 5px 15px;
  font-size: 0.5rem;
  text-align: right;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  a {
    color: #888;
    font-weight: normal;
    &:hover {
      color: #888;
      text-decoration: none;
    }
  }
}

.docs-search {
  margin-left: -15px;
  padding-left: 15px;
  margin-bottom: 0;
  border-bottom: 0;

  .form-control {
    font-size: 0.84rem;
    &:focus {
      box-shadow: 0 0 0 1px #931c82;
    }
  }
}

#docs-nav {
  margin-top: 0;
  padding-top: 0;
  position: relative;
  .nav-bottom {
    text-align: center;
    img {
      width: 39%;
      display: inline;
      padding-bottom: 1rem;
      opacity: 0.2;
    }
  }
}

.docs-nav {
  padding-left: 15px;
}

a.docs-toc-link {
  border-top: 1px solid #e7e4ea;
  background-color: #f9f7fb;
  border-bottom: 1px solid #e7e4ea;
  &:hover {
    color: $mosaic-purple;
  }
}
.docs-toc-item {
  margin-bottom: 0.5rem;
}

.nav.docs-sidenav li {
  margin: 0 0 0 1.1rem;
  padding: 0.1rem 1rem 0.1rem 1.1rem;
  position: relative;
  border-top-left-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;

  &.active {
    background-color: lighten($mosaic-purple, 10%);
    &::before,
    a:hover,
    a {
      color: #fff;
      font-weight: normal;
    }
  }

  &:hover:not(.active) {
    background-color: #f9f7fb;
    a {
      font-weight: normal;
      color: $mosaic-purple;
    }
  }

  &::before {
    content: "▶︎";
    position: absolute;
    top: 0.44rem;
    left: 0.4rem;
    font-size: 0.45rem;
    color: lighten($mosaic-purple, 10%);
  }

  & > a {
    padding: 0;
    font-weight: normal !important;
  }
}

.docs-toc {
  overflow-y: visible;
}

#TableOfContents li a, .toc-top li a {
  color: #79777d;
}

.prev-next-pages {
  padding: 15px;
}

@media screen and (max-width: 1140px) {
  .docs-sidebar {
    margin-right: 0;
  }
}
@media screen and (max-width: 576px) {
  .docs-sidebar {
    max-height: calc(100vh - 50px);
    overflow-y: scroll;
    position: fixed;
    z-index: 1;
    background-color: #fff;
    margin-right: 0;
  }
  .docs-content {
    margin-top: 70px;
  }
}
